<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线OJ-题目列表</title>
    <style>
        /* 全局样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f5f7fa;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 20px;
        }

        /* 返回首页按钮样式 */
        .back-home {
            margin-bottom: 20px;
            padding: 10px 20px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 5px;
            text-decoration: none;
            font-size: 16px;
            transition: background-color 0.3s ease;
        }

        .back-home:hover {
            background-color: #0056b3;
        }

        /* 表格容器 */
        .container {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 15px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 800px;
        }

        /* 表格样式 */
        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 12px 15px;
            text-align: left;
        }

        th {
            background-color: #f8f9fa;
            border-bottom: 2px solid #e9ecef;
            font-weight: 600;
        }

        /* 奇偶行不同背景色 */
        tr:nth-child(even) {
            background-color: #f9fafb;
        }

        /* 鼠标悬停效果 */
        tr:hover {
            background-color: #e9f5ff;
            cursor: pointer;
        }

        /* 标题链接样式 */
        .title-link {
            text-decoration: none;
            color: #007bff;
        }

        .title-link:hover {
            text-decoration: underline;
        }

        /* 难度星级样式 */
        .difficulty-star {
            color: #13ff07a9;
        }
    </style>
</head>
<body>
    <a href="../../" class="back-home">返回首页</a>
    <div class="container">
        <h1 style="text-align: center; padding: 20px 0; color: #333;">在线OJ题目列表</h1>
        <table>
            <thead>
                <tr>
                    <th>编号</th>
                    <th>标题</th>
                    <th>难度</th>
                </tr>
            </thead>
            <tbody>
                {{#question_list}}
                <tr>
                    <td>{{number}}</td>
                    <td><a href="/questions/{{number}}" class="title-link">{{title}}</a></td>
                    <td class="difficulty-star">{{star}}</td>
                </tr>
                {{/question_list}}
            </tbody>
        </table>
    </div>
</body>
</html>
    